package com.ruoyi.robot.util;

import com.ruoyi.robot.pojo.dto.*;
import com.ruoyi.robot.pojo.po.Customer;
import com.ruoyi.robot.pojo.po.Essay;
import com.ruoyi.robot.pojo.po.Robot;
import com.ruoyi.robot.pojo.po.RobotType;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * @author zzl
 * @date 2022/7/21 15:39
 */
@Mapper
public interface DtoToPoMapper {

    DtoToPoMapper INSTANCE = Mappers.getMapper(DtoToPoMapper.class);

    Customer toCustomer(CustomerDto customerDto);

    @Mapping(target = "essayTime",ignore = true)
    Essay toEssay(EssayDto essayDto);

    RobotType toRobotType(RobotTypeDto robotTypeDto);

    Robot toRobot(RobotDto robotDto);
}
